/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: hp
 * Date: 2024-07-14
 * Time: 21:49
 */
class MyRunnable implements Runnable {
    @Override
    public void run() {
        while(true) {
            System.out.println("hello Thread");
        }
    }
}

public class Demo1 {
    public static void main(String[] args) {
        Runnable r = new MyRunnable();
        Thread t = new Thread(r);
        t.start();
        while(true) {
            System.out.println("hello main");

        }
    }
}
